{% set editable_model = (field.widget.editable_model or field.widget.attrs.get("data-edit-model")) %}
{% if editable_model %}
<div class="edit-object-btn mr-1 ml-1">
    <a
        class="btn btn-inverse"
        data-toggle="popover"
        data-placement="bottom"
        data-trigger="manual"
        data-content="{{ _("Edit the selected object") }}"
        data-edit-model="{{ editable_model }}"
        data-edit-url="{{ url("shuup_admin:edit") }}"
        data-target="{{ field.field.html_name }}"
    >
        <i class="fa fa-pencil text-primary"></i>
    </a>
</div>
{% endif %}
